package calao.plan;

import calao.Application;
import calao.Service;
import calao.plan.client.PlanService;
import calao.storage.Schema;

public class PlanApplication
extends Application
{

	
	public static final String NAME = "calao.plan";
	
	public static final Schema SCHEMA;
	
	static {
		Schema schema = new Schema();
		schema.add(TaskDB.TABLE);
		schema.add(TaskDB.ID_SEQUENCE);
		schema.add(ResourceDB.TABLE);
		schema.add(ResourceDB.ID_SEQUENCE);
		schema.add(ResourceDB.WORK_PERIOD_BINDING);
		schema.register();
		SCHEMA = schema;
	}

	public PlanApplication()
	{
		super(NAME);
	}
	
	@Override
	public Service newService(Class serviceFace)
	{
		if (serviceFace==PlanService.class) return new PlanServiceImpl();
		if (serviceFace==ExtendedPlanService.class) return new PlanServiceImpl();
		return null;
	}
	
}
